package STUDENT.TRANBANGTUNG.day05_16_2016.tamgiac;

public class tringleModel {
	public double tinhchuvi(tringleObject obj) {

		return obj.getCanh1() + obj.getCanh2() + obj.getCanh3();
	}

	public double tinhdientich(tringleObject obj) {
		double p = (obj.getCanh1() + obj.getCanh2() + obj.getCanh3()) / 2;
		return Math.sqrt(p * (p - obj.getCanh1()) * (p - obj.getCanh2()) * (p - obj.getCanh3()));
	}
}
